package com.linh.trade.data;

import java.util.Random;

public class BrownianMotion {

	private long lastNano;
	private Random random;
	
	public BrownianMotion() {
		super();
		this.lastNano = System.nanoTime();
		random=new Random();
	}

	public double next(){
		
		long t=System.nanoTime()-lastNano;
		double n=random.nextGaussian();
		return n*t*Math.pow(10,-10);
	}
}
